import request from '@/utils/request'

// 查询优惠券发放记录列表
export function listCouponUser(query) {
  return request({
    url: '/business/couponUser/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券发放记录所有列表
export function listAllCouponUser(query) {
  return request({
    url: '/business/couponUser/listAll',
    method: 'get',
    params: query
  })
}

// 查询优惠券发放记录详细
export function getCouponUser(id) {
  return request({
    url: '/business/couponUser/getInfo/' + id,
    method: 'get'
  })
}

// 新增优惠券发放记录
export function addCouponUser(data) {
  return request({
    url: '/business/couponUser/add',
    method: 'post',
    data: data
  })
}

// 修改优惠券发放记录
export function updateCouponUser(data) {
  return request({
    url: '/business/couponUser/edit',
    method: 'post',
    data: data
  })
}

// 删除优惠券发放记录
export function delCouponUser(id) {
  return request({
    url: '/business/couponUser/remove/' + id,
    method: 'get'
  })
}
